import * as VueRouter from 'vue-router';
import Index from "../pages/Index.vue";
import Team from "../pages/Team.vue";
import User from "../pages/User.vue";
import Search from "../pages/Search.vue";
import UserEdit from "../pages/UserEdit.vue";
import SearchResultPage from "../pages/SearchResultPage.vue";
import UserLoginPage from "../pages/UserLoginPage.vue";



// 定义一些路由
const routes = [
    {path: '/', component: Index},
    {path: '/team', component: Team},
    {path: '/user', component: User},
    {path: '/search', component: Search},
    {path: '/user/edit', component: UserEdit},
    {path: '/user/list', component: SearchResultPage},
    {path: '/user/login', component: UserLoginPage}
]

const router = VueRouter.createRouter( {
    // 内部实现了hashHistory的实现，就是#分割开了uri
    history: VueRouter.createWebHashHistory(),
    routes
} )

export default router;